<?xml version="1.0" encoding="utf-8"?>
<taskrunner name="reinstall.uninstall" version="1.1" date="2013-06-20" maxthreads="1">

  <!-- Script för ominstallation. 
    Change Log:
      2013-06-20 : teriks28 : OGB project : eSWDL files will not be delivered toghter with Vida any more.
        Added input parameter "RestoreEswdl" to be past to task "douninstall"  
  -->
  
  <includes>
    <file name="vida.install.settings.xml" />
  </includes>

  <parameters>
    <parameter name="RestoreEswdl" value="#INPUT"/>
  </parameters>

  <tasks>

    <task name="Write.restore.eswdl" typename="@WriteInformation">
      <parameters>
        <parameter name="message" value="vida.reinstall.uninstall.xml RestoreEswdl: ${RestoreEswdl}"/>
      </parameters>
    </task>
    
    <task name="set.main.install.type" typename="@SetGlobalProperty">
      <description>
        Sets the global property main.install.type to UNINSTALL.
        This value will not change during the reinstallation.
      </description>
      <dependencies list="Write.restore.eswdl"/>
      <parameters>
        <parameter name="property.name" value="main.install.type"/>
        <parameter name="property.value" value="REINSTALL"/>
      </parameters>
    </task>

    <task name="douninstall">
      <dependencies list="set.main.install.type"/>
      <subtasks filename="vida.douninstall.xml">
        <parameters>
          <parameter name="RestoreEswdl" value="${RestoreEswdl}"/>
        </parameters>
      </subtasks>
    </task>

  </tasks>

  <events>
    <event name="ON_FINISH_OK">
      <subtasks filename="vida.finish.ok.xml">
      </subtasks>
    </event>

    <event name="ON_FINISH_FAILED">
      <subtasks filename="vida.finish.nok.xml">
      </subtasks>
    </event>
  </events>

</taskrunner>